﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Include/Admin.master" AutoEventWireup="true"
    CodeFile="ManageMessage.aspx.cs" Inherits="Admin_AdminSendMessage_ManageMessage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../../Style/Common/DatePage.css" rel="stylesheet" type="text/css" />
    <link href="../../Scripts/jquery-easyui-1.3.1/themes/default/easyui.css" rel="stylesheet"
        type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <table class="editTable" align="center" width="100%" cellpadding="0" cellspacing="1">
            <tr style="background-image: url('/images/管理员页面/title_bg1.jpg'); background-repeat: repeat-x;">
                <td colspan="6" style="font-weight: bold; font-size: large; font-family: 仿宋;">
                    <strong>【站内信管理】</strong>
                </td>
            </tr>
            <tr>
                <th>
                    接受者类别：
                </th>
                <td>
                    <asp:DropDownList ID="drpType" runat="server" Height="20px" Width="100px">
                    </asp:DropDownList>
                </td>
                <th>
                    发送时间：
                </th>
                <td>
                    <asp:TextBox ID="txtTimeFrom" CssClass="easyui-datebox" runat="server" Height="21px"
                        Width="100px"></asp:TextBox>
                    --<asp:TextBox ID="txtTimeTo" CssClass="easyui-datebox" runat="server" Height="21px"
                        Width="100px"></asp:TextBox>
                </td>
                <th>
                    关键字：
                </th>
                <td>
                    <asp:TextBox ID="txtKey" runat="server" Height="21px" Width="100px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    是否已读：
                </th>
                <td>
                    <asp:DropDownList ID="drpSFRead" runat="server" Height="20px" Width="100px">
                    </asp:DropDownList>
                </td>
                <td colspan="4">
                    <asp:Button ID="Button1" runat="server" Text="开始搜索" OnClick="btn_search_Click_Click" />
                </td>
            </tr>
        </table>
        <asp:ListView ID="lvSendMessage" runat="server" DataKeyNames="ID" OnItemDeleting="lvSendMessage_ItemDeleting"
            OnPagePropertiesChanged="lvSendMessage_PagePropertiesChanged">
            <LayoutTemplate>
                <table width="100%" id="XX" class="editTable" cellspacing="1" cellpadding="0">
                    <tr>
                        <th>
                            发送人
                        </th>
                        <th>
                            接收者
                        </th>
                        <th>
                            接收者类型
                        </th>
                        <th>
                            发送时间
                        </th>
                        <th>
                            内容简介
                        </th>
                        <th>
                            是否已读
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                </table>
            </LayoutTemplate>
            <ItemTemplate>
                <tr class="Parent">
                    <td class="accordion-expand" style="background-position: 0px center">
                        <%#ReturnZUserName(Eval("SendUserID"))%>
                    </td>
                    <td>
                        <%#ReturnUserName(Eval("GetUserID"), Eval("Type"))%>
                    </td>
                    <td>
                        <%#Enum.GetName(typeof(ZNXX.ZXXXType), Eval("Type"))%>
                    </td>
                    <td>
                        <%#Eval("SendTime")%>
                    </td>
                    <td>
                        <%#DongDong.Common.Misc.MaxCharacters(DongDong.Common.Misc.ClearHtml(Eval("Des")), 20, "..")%>
                    </td>
                    <td>
                        <%#ReturnZT(Eval("Status"))%>
                    </td>
                    <td>
                        <asp:LinkButton ID="lbtnDelete" runat="server" Text="删除" OnClientClick="return confirm('您是否确定删除?');"
                            CommandName="Delete" CommandArgument='<%#Eval("ID")%>'></asp:LinkButton>
                    </td>
                </tr>
                <tr style="display: none">
                    <td colspan="7">
                        <div style="width: 100%; max-height: 200px; overflow: auto">
                            <%#Eval("Des")%>
                        </div>
                    </td>
                </tr>
            </ItemTemplate>
            <EmptyDataTemplate>
                <tr>
                    <td colspan="4">
                        --没有数据--
                    </td>
                </tr>
            </EmptyDataTemplate>
        </asp:ListView>
        <div style="padding: 4px; text-align: center;">
            <asp:DataPager ID="Pager" runat="server" PagedControlID="lvSendMessage" OnPreRender="Pager_PreRender"
                PageSize="20">
                <Fields>
                    <asp:TemplatePagerField>
                        <PagerTemplate>
                            共<%=Pager.TotalRowCount%>条数据
                        </PagerTemplate>
                    </asp:TemplatePagerField>
                    <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowLastPageButton="true" />
                    <asp:NumericPagerField ButtonCount="5" CurrentPageLabelCssClass="CurrentPage" NumericButtonCssClass="Page" />
                </Fields>
            </asp:DataPager>
        </div>
    </div>
    <script src="../../Scripts/jquery-easyui-1.3.1/jquery.easyui.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $("#XX .Parent").click(function () {

            var td = $(this).children(":first");
            var Next = $(this).next();
            if (td.attr("class").trim() == "accordion-expand") {
                td.removeClass("accordion-expand").addClass("accordion-collapse");
                Next.show();
             
            }
            else {

                td.removeClass("accordion-collapse").addClass("accordion-expand");
                Next.hide();
            }
        })
    </script>
</asp:Content>
